using System.ComponentModel.DataAnnotations;

namespace Universal.Application.Contracts.Dto.User;

/// <summary>
/// 修改个人中心的用户信息
/// </summary>
public record UpdateUserProfileDto
{

    [MinLength(1, ErrorMessage = "昵称不能为空，至少1个字符")]
    public string Nickname { get; init; } = string.Empty;

    [Required(ErrorMessage = "邮箱不能为空")]
    [RegularExpression(@"^[^\s@]+@[^\s@]+\.[^\s@]+$", ErrorMessage = "邮箱格式不正确，请重新输入!!")]
    public string Email { get; init; } = string.Empty;

    [Required(ErrorMessage = "手机号不能为空")]
    [RegularExpression(@"^1[3-9]\d{9}$", ErrorMessage = "请输入有效的手机号码!!")]
    public string Phone { get; init; } = string.Empty;

    public string? Description { get; init; } = string.Empty;


}